home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / check160.zip / CHECKSYS.DOC next >
Text File  |  1992-07-22  |  6KB  |  144 lines

  1.                 Command-line diagnostic CHECKSYS.EXE
  2.  
  3.  
  4. Dan Shearer, Computer Centre, University of South Australia
  5. Comments and bug reports to:  ccdps@lux.levels.unisa.edu.au
  6.  
  7. I'd appreciate ideas or code for more checks.
  8.  
  9. Version 1.6 released to the public domain 22nd July, 1992.
  10.  
  11.  
  12. Overview
  13. ---------
  14.  
  15. CHECKSYS is a command-line diagnostic program which either gives a short
  16. description of a whole PC system, or returns a one-line description and
  17. gives an errorlevel when asked about one aspect of the system.
  18. The primary intention is for it to be used to determine system configuration
  19. and driver status from batch files. It can also be handy when wanting a
  20. quick idea of what a machine has during a system debugging session
  21. without starting up a complicated package and poking around menus.
  22.  
  23.  
  24. Reasoning Behind CHECKSYS
  25. -------------------------
  26.  
  27. We have a very mixed hardware environment at UniSA, but like to have
  28. generic batch files on the LAN. In our batch file that starts up Windows,
  29. for instance, we have several CHECKSYS calls to determine what mode
  30. Windows should be run in and what hardware drivers are needed, and also
  31. to check and see if Windows is already running.
  32.  
  33.  
  34. When to Use CHECKSYS
  35. --------------------
  36.  
  37. Some things can be detected quite reliably from DOS using an IF EXIST...
  38. test on a driver name. For example, if you have an Etherlink II network
  39. card installed and you know its driver is called ELNKII$ then you can
  40. say something like:
  41.  
  42.      IF EXIST ELNKII$ ECHO   There is a 3Com Etherlink II card installed
  43.  
  44. If you don't know what the driver is called, a simple way to find out is
  45. to use DOS 5's MEM /D command, which lists the names of all drivers loaded.
  46. You can also use this method to determine the existence of extended memory,
  47. expanded memory, and so on. It is a very crude check, no staus info etc but
  48. works quite well. CHECKSYS is for when you need more detail; for
  49. instance, EMM386 and HIMEM might be installed but the HMA not be
  50. available.
  51.  
  52.  
  53. How it Works and Acknowledgements
  54. ---------------------------------
  55.  
  56. It is a collection of routines that I have put together in Turbo Pascal
  57. 6.0, with assembler routines to check for CPU and FPU. All the detection
  58. calls are in a self-contained TP unit, and I would be willing to release
  59. this to the public domain as well if there was a call for it.
  60.  
  61. The commandline switch checking code in CHECKSYS is with the kind permission
  62. of Rocky Stone, also of UniSA. Gary Oxton (once a UniSA student) wrote
  63. the basis of the CPU-detection assembler I have used for his final-year
  64. Computer Studies project. I have learnt about checking for memory types
  65. from the InfoPlus source code, by Andrew Rossman and Steve Grant, and
  66. used their LongCall assembler function, which overcomes a shonky nonfeature
  67. of Turbo Pascal 6.0.
  68.  
  69. Ralf Brown's interrupt list is, of course, absolutely essential.
  70.  
  71.  
  72. Syntax
  73. ------
  74.  
  75. CHECKSYS Vers 1.6                                          (C) 1992 Eyesright
  76.                        Comments to Dan Shearer, University of South Australia
  77.                                                      Dan.Shearer@UniSA.edu.au
  78.  
  79. CHECKSYS [/switches]         where switches for this free software are:
  80.        /ALL  Displays messages for all tests and returns errorlevel 0
  81.        /CPU  returns errorlevel 0-8 in order for:
  82.              8088, 8086, V20, V30, 80188, 80186, Unknown, 80286, 80386 
  83.        /EMM  returns errorlevel 1 if EMM driver installed
  84.        /FTP  returns 1 if packet driver responding
  85.        /KBD  returns errorlevel 1 if extended keyboard installed
  86.        /MOUSE  returns number of mouse buttons (=0 for no mouse)
  87.        /NETBIOS  returns errorlevel 1 if NetBIOS responding
  88.        /PAR  returns number of parallel ports recognised by BIOS
  89.        /PROTMAN  1 if Microsoft Network Driver Interface (PROTMAN$) responding
  90.        /REMBOOT returns 1 if drive 0 parkable (ie not a network device)
  91.        /SER  returns number of serial ports recognised by BIOS
  92.        /VID  returns 1-10 in order for:
  93.              CGA, MCGA, EGA, EGA64, EGAMon, 8514, HercMon, ATT400, VGA, PC3270
  94.        /WIN  returns 0-3 in order for:
  95.              Win 3.x (/3), Win 3.x (/R or /S), Win/386 2.x, No Windows
  96.        /XMS  returns 2 for XMS & HMA avail, 1 for XMS but no HMA, 0 for no XMS
  97.        /87   returns 0-3 in order for: 80387, 80287, 8087, None
  98.  
  99.        Each test also displays a detailed message to standard output.
  100.        Switches can be abbreviated to 1 letter. Errorlevel 99 for syntax error.
  101.  
  102.  
  103. Examples:
  104.  
  105.    CHECKSYS             displays the above help message
  106.    CHECKSYS /ALL        displays detailed results of all tests
  107.    CHECKSYS /MOUSE      displays detailed info about the mouse, and
  108.                         returns errorlevels 0 for not present, 2 for two
  109.                         button mouse present or 3 for three button mouse.
  110.  
  111.    Remember when checking errorlevels in batch files that if a program
  112.    returns errorlevel n DOS also returns all other errorlevels from n-1 down
  113.    to 0. This is why (for instance) CHECKSYS /WINDOWS returns errorlevel 3 for
  114.    no windows and 0 for version 3.x. If it was 0 for no windows, you would
  115.    still have to check to see that it wasn't one of the others.
  116.  
  117.  
  118. Bugs
  119. ----
  120.  
  121.    BIOS is often wrong about printer and comms ports. Could add some better
  122.    checks.
  123.  
  124.    The FPU check gives a silly result when used on a NEC V20 chip with an
  125.    Intel 8087 installed
  126.  
  127.    Doesn't test for Weitek FPU
  128.  
  129.    Doesn't distinguish OS/2 dos-boxes from Windows dos-boxes
  130.  
  131.    Doesn't test for various network cards
  132.  
  133.    Doesn't test for game port
  134.  
  135.    Doesn't give video chipset particulars (might be useful for running
  136.    Windows with specific screen drivers)
  137.  
  138.    Doesn't detect sound cards
  139.  
  140.    Could possibly have a TSR check, ie syntax like:
  141.  
  142.           CHECKSYS <unique TSR signature> [<optional range of interrupts>]
  143.  
  144.